<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@taglib uri="/struts-tags" prefix="s"%>


<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE html>
<html lang="zh-cn">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<meta name="viewport"
			content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
		<meta name="renderer" content="webkit">
		<title>后台管理</title>

		<meta name="decorator" content="datePicker"/>
		<script type="text/javascript">
			$(function(){
				$("#tongji").addClass("active");
				$("#tongji").find("ul li").eq(0).addClass("active");

				})
		</script>
	</head>
	<body>
		<div class="admin" style="background: white;">

			<div class="panel">
				<div class="panel-head">
					阶段统计
				</div>

				<div class="padding border-bottom">

					<div style="text-align: center">
						<form method="post" action="<%=path %>/admin/tongji/tongji!findbytime2.action"
							class="form-inline">
							<div class="form-group">
								<div class="label">
									<label for="startTime1">
										开始时间:
									</label>
								</div>
								&nbsp;
								<div class="field">
									<input name="time1" id="startTime1" type="text"
										class="input input-auto" size="35"
										onFocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',maxDate:'#F{$dp.$D(\'endTime1\')}'})"
										placeholder="请输入开始时间" />
								</div>
							</div>
							&nbsp;&nbsp;
							<div class="form-group">
								<div class="label">
									<label for="endTime1">
										结束时间:
									</label>
								</div>
								&nbsp;
								<div class="field">
									<input name="time2" id="endTime1" type="text" class="input"
										size="35"
										onFocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',minDate:'#F{$dp.$D(\'startTime1\')}',maxDate:'%y-%M-%d %H:%m:%s'})"
										placeholder="请输入结束时间" />
								</div>
							</div>
							<button class="button bg-sub button-small" name="cx"
								onclick="return getResult1()">
								统计
							</button>
						</form>
					</div>

				</div>
				<div class="panel-body">

					<table class="table table-bordered" style="background: #F0F0F0;">
						<tr style="height: 100px;">
							<td style="width: 33%;">
								<div class="txt radius-circle bg-blue "
									style="position: relative; top: 20px; left: 10px;"></div>
								<span style="position: relative; right: 25px; top: 7px;"
									class="icon-shopping-cart text-large text-white"></span>
								<div style="position: relative; left: 50px; bottom: 30px;">
									<div style="font-size: 25px;">
										&nbsp;&nbsp;&nbsp;${tongji.pay}
									</div>
									昨日付款订单
								</div>
							</td>
							<td style="background: white; width: 33%;">
								<div class="txt radius-circle bg-green "
									style="position: relative; top: 20px; left: 10px;"></div>
								<span style="position: relative; right: 20px; top: 7px;"
									class="icon-cny (alias) text-large text-white"></span>
								<div style="position: relative; left: 50px; bottom: 30px;">
									<div style="font-size: 25px;">
										&nbsp;&nbsp;&nbsp;${tongji.money}
									</div>
									昨日成交额
								</div>
							</td>
							<td style="width: 33%;">
								<div class="txt radius-circle bg-gray "
									style="position: relative; top: 20px; left: 10px;"></div>
								<span style="position: relative; right: 20px; top: 7px;"
									class="icon-dollar (alias) text-large text-white"></span>
								<div style="position: relative; left: 50px; bottom: 30px;">
									<div style="font-size: 25px;">
										&nbsp;&nbsp;&nbsp;${tongji.price}
									</div>
									昨日客单价
								</div>
							</td>
						</tr>
						<tr style="">
						<td style="background: white; width: 33%;">
							<div class="txt radius-circle bg-yellow "
								style="position: relative; top: 20px; left: 10px;"></div>
							<span style="position: relative; right: 25px; top: 7px;"
								class="icon-user text-large text-white"></span>
							<div style="position: relative; left: 50px; bottom: 30px;">
								<div style="font-size: 25px;">
									&nbsp;&nbsp;&nbsp;${tongji.team}
								</div>
								昨日新增分销商
							</div>
						</td>
						<td style="width: 33%;">
							<div class="txt radius-circle bg-green "
								style="position: relative; top: 20px; left: 10px;"></div>
							<span style="position: relative; right: 25px; top: 7px;"
								class="icon-sitemap text-large text-white"></span>
							<div style="position: relative; left: 50px; bottom: 30px;">
								<div style="font-size: 25px;">
									&nbsp;&nbsp;&nbsp;${tongji.allorder}
								</div>
								订单总数
							</div>
						</td>
						<td style="background: white; width: 33%;">
							<div class="txt radius-circle bg-blue "
								style="position: relative; top: 20px; left: 10px;"></div>
							<span style="position: relative; right: 25px; top: 7px;"
								class="icon-users text-large text-white"></span>
							<div style="position: relative; left: 50px; bottom: 30px;">
								<div style="font-size: 25px;">
									&nbsp;&nbsp;&nbsp;${tongji.allteam}
								</div>
								分销商总数
							</div>
						</td>

						</tr>
					</table>

				</div>
			</div>
			<br/>
			<div class="panel">
				<div class="panel-head">
					每日数据
				</div>
				<div class="padding border-bottom">
					<div style="text-align: center">
						<form method="post" action="<%=path %>/admin/tongji/tongji!findbytime3.action"
							class="form-inline">
							<div class="form-group">
								<div class="label">
									<label for="startTime2">
										开始时间:
									</label>
								</div>
								&nbsp;
								<div class="field">
									<input name="time1" id="startTime2" type="text"
										class="input input-auto" size="35"
										onFocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',maxDate:'#F{$dp.$D(\'endTime2\')}'})"
										placeholder="请输入开始时间" />
								</div>
							</div>
							&nbsp;&nbsp;
							<div class="form-group">
								<div class="label">
									<label for="endTime2">
										结束时间:
									</label>
								</div>
								&nbsp;
								<div class="field">
									<input name="time2" id="endTime2" type="text" class="input"
										size="35"
										onFocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',minDate:'#F{$dp.$D(\'startTime2\')}',maxDate:'%y-%M-%d %H:%m:%s'})"
										placeholder="请输入结束时间" />
								</div>
							</div>
							<button class="button bg-sub button-small" name="cx"
								onclick="return getResult2()">
								查看
							</button>
						</form>
					</div>

				</div>

				<div class="panel-body">
					<table class="table table-bordered">

						<tr>
							<th>
								来源日期
							</th>
							<th>
								付款订单
							</th>
							<th>
								成交额
							</th>
							<th>
								客单价
							</th>
							<th>
								新增分销商
							</th>
							<th>
								订单总数
							</th>
							<th>
								分销商总数
							</th>
						</tr>
						<s:iterator value="tongjis">
							<tr>
								<td>
									<s:property value="time" />
								</td>
								<td>
									<s:property value="pay" />
								</td>
								<td>
									<s:property value="money" />
								</td>
								<td>
									<s:property value="price" />
								</td>
								<td>
									<s:property value="team" />
								</td>
								<td>
									<s:property value="allorder" />
								</td>
								<td>
									<s:property value="allteam" />
								</td>
							</tr>
						</s:iterator>
					</table>
				</div>

			</div>
		</div>
	</body>
</html>